package com.rmc.verifycode.service;

import com.rmc.verifycode.CharGroup;

import java.io.File;

import static com.rmc.verifycode.CharGroupFactory.FACTORY;

public class BasicParseService implements ParseService {

	@Override
	public String parse(File image, String id) {
		System.out.println(image.getAbsolutePath());
		CharGroup charGroup = FACTORY.getCharGroup(id);
		String code = charGroup.match(image);
		System.out.println(code);
		return code;
	}

}
